package com.itheima.variable;

/**
 * @author yuanying
 * @date 2025/7/22 -  9:17
 */
public class ForDemo2 {
    public static void main(String[] args) {
        int sum=0;
        for(int i=1;i<=10;i++){
            if(i%2==1)
            {
                sum+=i;
            }
        }
        System.out.println("求和结果是"+sum);
    }
}
